package com.sdhs.paas.sdk.app;

import org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;

import com.sdhs.paas.sdk.core.web.client.EnablePaasRestTemplate;

@SpringBootApplication
@EnablePaasRestTemplate
@EnableDiscoveryClient
//@EnablePaasLog
@EnableAutoConfiguration(exclude = { JpaRepositoriesAutoConfiguration.class,HibernateJpaAutoConfiguration.class, DataSourceAutoConfiguration.class,
		MybatisAutoConfiguration.class })
@ComponentScan(value = { "com.sdhs"})
public class NativeSdkApplication {

	public static void main(String[] args) {
//		String[] newargs = buildAppEnv(args);
		ConfigurableApplicationContext ctx = SpringApplication.run(NativeSdkApplication.class, args);
		System.out.println("NativeSdkApplication 启动完毕！应用名称:{}--"+ctx.getId());
//		SpringApplication app = new SpringApplication(NativeSdkApplication.class); 
//		app.addListeners(new MyApplicationStartedEventListener());
//		app.run(args);
//		SpringApplication.setWebApplicationType(WebApplicationType.REACTIVE);
	}
}
